import { Injectable } from '@nestjs/common';
import { MailerService } from '@nest-modules/mailer';

@Injectable()
export class EmailService {
  constructor(
    private readonly mailerService: MailerService,
  ) {}

  sendEmail() {
    this.mailerService.sendMail({
      to: 'lfqdalian@sina.com',
      from: 'lfqdalian@qq.com',
      subject: '发送邮件测试',
      // html: '<b>Welcome !</b>',
      template: 'welcome',

    });
  }
}
